// part1:C15:15.5:Bulk_quote.h
// class Bulk_quote.
#ifdef BULK_QUOTE_H__
#define BULK_QUOTE_H__
#include "../15.3/Quote.h" 
class Bulk_quote : public Quote
{
public:
    Bulk_quote(const string &book = "", double sales_price = 0,
            size_t qty = 0, double disc_rate = 0):
      Quote(book, sales_price), min_qty(qty), discount(disc_rate){}
    double net_price(size_t cnt) const override
    {
        if (cnt >= min_qty) 
        {
            return cnt * (1 - discount) * price;
        }
        else
        {
            return cnt * price;
        }
    }
private:
    size_t min_qty;
    double discount;
};
#endif
